Method for synchronizing a multimedia file

ABSTRACT

The invention concerns a method for synchronizing data in a multimedia document ( 50 ), said document comprising at least two separate computer files (track 1,  track 2 ) called the first file, the second file, etc., in which method:—there is stored in the first file, in the second file, etc., respectively data of a first type, of a second type, etc., said data being grouped in the form of at least one event-related command characterizing an event, said event being either important or unimportant,—at least one synchronization command is inserted in each file, characterized in that said synchronization command is inserted before each event-related command characterizing an important event.

[0001] The present invention relates to a method of synchronizing different types of data in a multimedia file. It applies, for example, to portable systems such as mobile radio terminals, pocket computers or any other equipment that can have multimedia capabilities and for which the size of multimedia files and the computation power needed to process them constitute a problem.

[0002] There are very many monomedia files, i.e. files relating to only one particular type of data, such as the JPEG (Joint Photographic Expert Group) format for storing pictures or the RTF (Rich Text File) format for storing text.

[0003] The expression “multimedia file” generally refers to integrating different types of data (such as pictures, sound and text) in the same file. Each type of data is contained in a given track. Each track is organized in the form of a series of commands. Each track is scanned by a microprocessor. Each microprocessor executes, at the same time as the others, commands from one track or simultaneous commands from more than one track and can present the data, via different interfaces, to a user of an equipment with multimedia capabilities. The interfaces can be a screen for text and picture data and a loudspeaker for audio data. The user therefore sees text and pictures whilst hearing sounds.

[0004] The problem is therefore to match the text to the music and the pictures, i.e. to synchronize the different types of data contained in the same multimedia file.

[0005] Each microprocessor, associated with each track containing one type of data uses an oscillator. Each oscillator produces a signal with a frequency slightly different from those of the other oscillators. Also, the software executed by each processor can be based on different operating systems, which drift with time in dissimilar ways. Thus two microprocessors that begin to read their respective tracks at the same time are eventually no longer synchronized with each other. For example, if the microprocessor for the sound data track is lagging behind the microprocessor for the text data track, the text of a phrase will be displayed before the sung phrase is heard. The prior art solution is temporal synchronization.

[0006] In the FIG. 1 example, the microprocessor μp₁, which reads the track 1 containing sound, sends synchronization data every 3 μs to the microprocessor μp₂, which reads the track 2 containing text. The synchronization data can optionally be stored in the multimedia file.

[0007] Thus the microprocessor μp₂ verifies every 3 μs whether its clock is synchronized to that of the first microprocessor μp₁. If the microprocessor μp₂ finds that it is in advance of the other one, it calculates the time difference and stops reading track 2 for that period of time. It then restarts in synchronism with the microprocessor μp₁. It is apparent that the better the synchronization required, the greater the quantity of synchronization data that has to be sent and the more frequently it has to be sent.

[0008] In mobile terminals there are severe file size constraints. The available memory is limited for reasons of overall size and battery life. What is more, multimedia files must be downloadable from a server center in a reasonable time, which is directly dependent on the file size.

[0009] Storing recurrent synchronization data is costly in terms of memory: the flow of data exchanged is burdened with many exchanges of synchronization data, which overloads the memory.

[0010] The above solution also has a further and major disadvantage: the synchronization data can reach the microprocessor μp₂ while it is in the middle of displaying a phrase. The display of the phrase is then stopped short, and the user does not receive the impression of fluid presentation of data.

[0011] The object of the present invention is to reduce the size of multimedia files, to optimize the quantity of data exchanged, and to provide optimum synchronization.

[0012] To this end, the invention provides a method of synchronizing data in a multimedia document (50) comprising at least two separate data files (track1, track2) referred to as the first file, the second file, etc., in which method:

[0013] data of a first type, of a second type, etc. is stored in the first file, in the second file, etc., respectively, and grouped into the form of at least one event-related command characterizing an important event or an unimportant event, and

[0014] at least one synchronization command is inserted into each file, which method is characterized in that said synchronization command is inserted before each event-related command characterizing an important event.

[0015] The method is advantageously characterized in that the important event corresponds to a command to display a text, a command to display a picture, or a command to reproduce a sound.

[0016] The invention also provides a device for synchronizing data in a multimedia file containing at least one track in which said data is stored and at least one synchronization command in each track, said device having first means for reading the data of each track and second means enabling the first means to communicate with each other, the data communicated between said first means concerning the occurrence of a synchronization command. The device is characterized in that one of the first data reading means is designated as having the highest priority and forces the other first means to synchronize with it.

[0017] The invention and its advantages will become clearer in the course of the following description with reference to the accompanying drawings.

[0018]FIG. 1, already described, represents the synchronization of a multimedia file in the prior art.

[0019]FIG. 2 is a diagram of a multimedia file conforming to the invention.

[0020]FIG. 3 is a detailed view of tracks in a multimedia file.

[0021] The data in a multimedia file according to the invention can comprise either time values or sound, text or picture coding values. The time values can represent a note duration, an image display time, a track start or end time, or a waiting time between two events. According to the invention, the tracks of the multimedia file also include synchronization commands related to the various events included in the track (note, picture, text, etc.).

[0022]FIG. 2 is a diagram showing the structure of a multimedia file according to the invention.

[0023] The multimedia file 50 includes a header 55 and tracks 60, 70 and 80. According to the invention, a multimedia file can include a number of tracks from 1 to n and FIG. 2 merely represents one example of this kind of file.

[0024] The header 55 includes data that is common to all of the tracks and is not described in detail here.

[0025] Each track of the file 50 can contain a single type of data. For example, track 60 can be a MIDI (Musical Instrument Digital Interface) format track for sound, track 70 can contain a sequence of pictures, and track 80 can contain sequences of texts. The different tracks may be intended to be scanned by microprocessors and presented simultaneously to a user. The different microprocessors therefore scan the tracks at the same time.

[0026] Each track 60, 70 and 80 has a respective header 65, 75 and 85. Each header contains an indicator of the type of data contained in the track. Thus the microprocessor able to read MIDI data knows from this indicator which track to read.

[0027] Each track also contains data organized in the form of commands which are executed sequentially by the microprocessor (for example to display a picture or a text).

[0028]FIG. 3 shows one example of a structure of three tracks contained in a multimedia file.

[0029] In this example:

[0030] Track 60 or track 1 contains only MIDI sound data. The sound data could consist of sampled sounds (speech, miscellaneous noises such as applause or microphone noise, etc.).

[0031] Track 70 or track 2 contains only data corresponding to sequences of JPEG images. This data could equally be video data.

[0032] Track 80 or track 3 contains only data corresponding to text messages.

[0033] Each track has a Start field for starting presentation to the user and an End field for ending presentation to the user.

[0034] Track 1 contains data relating to sound. A first field Nf₁ represents the frequency of a first note and a second field Nd₁ represents its duration. Likewise, the fields Nh₂ and Nd₂ define a second note. The field D₁ represents a waiting time before presenting the subsequent notes of the track.

[0035] The fields Nh₃ and Nd₃ respectively represent the frequency and the duration of a third note.

[0036] Thus fields defining a note or a waiting time can follow on from each other in track 1.

[0037] Track 2 contains data corresponding to sequences of JPEG images. In this example, two JPEG images represented by the fields JPEG1 and JPEG2 must be presented to the user for a given time represented by the field JPEGd₁ for the image JPEG1 and the field JPEGd₂ for the image JPEG2. The fields JPEGD₀, JPEGD₁ and JPEGD₂ represent waiting times before or between images.

[0038] Track 3 contains data corresponding to text messages. In this example two syllables represented by the fields TEXT1 and TEXT2 must be presented to the user. The fields TEXTD₀ and TEXTD₁ represent waiting times before a text.

[0039] The synchronization commands are represented by fields SYNCHi for i from 1 to n.

[0040] The synchronization commands are not temporal commands, as in the prior art, but are instead dependent on a specific event. Thus the fields SYNCHi are not present in the tracks at regular time intervals.

[0041] In the FIG. 3 example, musical notes included in the track 1 data must not be interrupted. Synchronizing the three tracks must not entail interrupting the music heard by the user. The microprocessor dedicated to reading this track is considered to be the master.

[0042] It forces the other microprocessors in charge of the other tracks, referred to as slaves, to synchronize with it.

[0043] Some notes must correspond to the display of an image or a syllable.

[0044] In this example, the first fields NF₁ and Nd₁ correspond to a first note. The second note, corresponding to the second fields NF₂ and Nd₂, must be heard at the moment the first picture is displayed, corresponding to the field JPEG1 of track 2. Then, after a waiting time corresponding to the field D₁, the third note, corresponding to the third fields Nf₃ and Nd₃, must be heard at the moment that the first syllable is displayed, corresponding to the field TEXT1 of track 1. Finally, the fourth note, corresponding to the fourth fields Nf₄ and Nd₄, must be heard at the moment at which are simultaneously displayed the second picture, corresponding to the field JPEG1 in track 2, and the second syllable, corresponding to the field TEXT2 in track 1.

[0045] Thus the first synchronization command, which corresponds to the field SYNCH1, is:

[0046] between the fields Nd₁ and Nf₂ in track 1,

[0047] between the fields JPEGD₀ and JPEG1 in track 2,

[0048] between the fields TEXTD₀ and TEXTD₁ in track 3.

[0049] The second synchronization command, which corresponds to the field SYNCH2, is:

[0050] between the fields D₂ and Nf₃ in track 1,

[0051] between the fields JPEGD₁ and JPEGD₂ in track 2,

[0052] between the fields TEXTD₁ and TEXT in track 3.

[0053] The third synchronization command, which corresponds to the field SYNCH3, is:

[0054] between the fields Nd₃ and Nf₄ in track 1,

[0055] between the fields JPEGD₂ and JPEG2 in track 2,

[0056] between the fields TEXT1 and TEXT2 in track 3.

[0057] When the multimedia document is presented to the user, the microprocessors scan all the tracks at the same time. Two situations arise, according to whether the slave microprocessors are lagging behind or in advance of the master microprocessor. Each slave microprocessor can receive data concerning the synchronization commands from the master microprocessor.

[0058] The master microprocessor, which is dedicated to track 1, reaches the first synchronization command, corresponding to the field SYNCH1, and sends first synchronization data to the other microprocessors.

[0059] Two situations arise:

[0060] If, at the moment it receives data, the slave microprocessor dedicated to track i, which is lagging behind, has not yet encountered the field SYNCH1 in track i, it continues to scan its file without executing the commands encountered, in order to reach the field SYNCH1 as quickly as possible. It then resumes execution of commands encountered after the field SYNCH 1.

[0061] If, before receiving the data, the slave microprocessor dedicated to track i had already reached the field SYNCH1, it stops reading the fields of track i until it receives the first synchronization data sent by the master microprocessor. It then resumes reading the fields of track i and executes the commands described.

[0062] Thus each important command, i.e. a command whose execution must not be interrupted, is represented by a given field preceded by a field representing a synchronization command. The synchronization command is at the same place in all the other tracks. Because of this, different tracks are resynchronized before any important command, if necessary.

[0063] Thus the invention synchronizes data in a multimedia file without overloading the memory with unnecessary synchronization data, and thereby restricting transfers of synchronization data between the microprocessors, without overloading the tracks with large quantities of unnecessary synchronization data, and most importantly without the execution of an important command stopping in the middle. 

1. A method of synchronizing data in a multimedia document (50) comprising at least two separate data files (track1, track2) referred to as the first file, the second file, etc., in which method: data of a first type, of a second type, etc. is stored in the first file, in the second file, etc., respectively, and grouped into the form of at least one event-related command characterizing an important event or an unimportant event, and at least one synchronization command is inserted into each file, which method is characterized in that said synchronization command is inserted before each event-related command characterizing an important event.
 2. A method according to claim 1, characterized in that the important event corresponds to a command to display a text, a command to display a picture, or a command to reproduce a sound.
 3. A method according to either preceding claim, characterized in that said synchronization command included in a first file (60) is repeated identically in the other file or files (70, 80) of the multimedia document so that execution of the synchronization command at the beginning of the first file is concomitant with execution of the first synchronization command at the beginning of the other file or files (70, 80).
 4. A method according to any preceding claim, characterized in that each synchronization command is uniquely identified.
 5. A method according to any preceding claim, characterized in that each of the synchronization commands to be executed simultaneously has the same number from one file to another.
 6. A method according to claims 3 to 5, wherein: one file is designated as having priority over the other file or files, all the files of the document are read simultaneously, and the successive commands included in each of the files are executed. During this step, as soon as a synchronization command is read in one of the files: if the synchronization command is found in the priority file, the non-priority file or files continue(s) to be read, without executing the event-related commands that are read, until said synchronization command is found in said non-priority file or files, and execution of event-related commands after said synchronization command in the non-priority file is resumed, if the synchronization command is found in the non-priority file or one of the non-priority files: the reading of said non-priority file or files is stopped, the reading and the execution of event-related commands in the priority file is continued until said synchronization command is found, and the commands of the non-priority file or files are read and executed again, and the reading and the execution of commands in the priority file continue.
 7. A device for implementing the method according to claims 1 to 6, for exploiting a multimedia document (50) containing at least two separate files (track1, track2), the device including reading means for reading data in each file and communication means so that the reading means can communicate with each other, the data communicated between said reading means concerning the reading of a synchronization command in a file, which device is characterized in that one file reading means is designated as having priority over the other reading means. 